/**
 * Created by Intellij IDEA
 *
 * @author 王俊凯
 * @Date: 2023/3/1 18:34
 * @Version 1.0
 */
package com.eight.service.impl;

import com.eight.dao.CarTypeCountDao;
import com.eight.pojo.TbCarType;
import com.eight.service.CatTypeCountService;
import com.eight.vo.CarTypeVo;
import com.eight.vo.ComResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CarTypeCountService implements CatTypeCountService {

    @Autowired
    private CarTypeCountDao carTypeCountDao;

    @Override
    public ComResult typeCount() {
        List<CarTypeVo> carTypeVos = carTypeCountDao.typeCount();
        return new ComResult(2000,"查询成功",carTypeVos);
    }

    @Override
    public ComResult carBrand() {
        List<CarTypeVo> carBrand = carTypeCountDao.carBrand();
        return new ComResult(2000,"查询成功",carBrand);
    }

    @Override
    public ComResult carSale() {
        List<CarTypeVo> carTypeVos = carTypeCountDao.carSale();
        return new ComResult(2000,"查询成功",carTypeVos);
    }
}

